﻿@model sBlog.Net.Areas.Admin.Models.AdminPostOrPageViewModel
@{
    ViewBag.Title = string.Format("Manage Posts || {0}", Model.Title);
}
<script type="text/javascript">
    function ValidForm() {
        var str = $("#txtSearch").val();
        if (str == '') {
            alert('Bạn phải nhập thông tin cần tìm!');
            $("#txtSearch").focus();
            return false;
        }
        return true;
    }
</script>
@Html.ActionLink("Published", "ManagePosts", new { type = "pub" })
|
@Html.ActionLink("Private", "ManagePosts", new { type = "pri" })
|
@Html.ActionLink("Is home page", "ManagePosts", new { type = "isHomePage" })
|
@Html.ActionLink("Is home user", "ManagePosts", new { type = "isHomeUser" })
|
@Html.ActionLink("Is home cat", "ManagePosts", new { type = "isHomeCat" })
|
@Html.ActionLink("Is feature", "ManagePosts", new { type = "isFeature" })
|
@Html.ActionLink("Show Read content", "ManagePosts", new { type = "ShowReadPage" })
|
@Html.ActionLink("Widget YanNews", "ManagePosts", new { type = "isYanNews" })
<br />
<b>@Html.ActionLink("Đẹp", "ManagePosts", new { type = "isDep" })</b> |
@Html.ActionLink("Đời còn đẹp lắm", "ManagePosts", new { type = "isDep1" })
|
@Html.ActionLink("Trà sữa cho tâm hồn", "ManagePosts", new { type = "isDep2" })
|
@Html.ActionLink("Mắt đẹp", "ManagePosts", new { type = "isDep3" })
|
@Html.ActionLink("Cho một vé tuổi thơ", "ManagePosts", new { type = "isDep4" })
|
@Html.ActionLink("Video", "ManagePosts", new { type = "isDep5" })
<br />
<b>@Html.ActionLink("Khỏe", "ManagePosts", new { type = "isKhoe" })</b> |
@Html.ActionLink("Ăn đúng cách", "ManagePosts", new { type = "isKhoe1" })
|
@Html.ActionLink("Sống tích cực", "ManagePosts", new { type = "isKhoe2" })
|
@Html.ActionLink("Yêu lành mạnh", "ManagePosts", new { type = "isKhoe3" })
|
@Html.ActionLink("DIY", "ManagePosts", new { type = "isKhoe4" })
|
@Html.ActionLink("Video", "ManagePosts", new { type = "isKhoe5" })
<br />
<b>@Html.ActionLink("Vui", "ManagePosts", new { type = "isVui" })</b> |
@Html.ActionLink("Funny", "ManagePosts", new { type = "isVui1" })
|
@Html.ActionLink("Cung hoàng đạo", "ManagePosts", new { type = "isVui2" })
|
@Html.ActionLink("Truyện vui", "ManagePosts", new { type = "isVui3" })
|
@Html.ActionLink("Video", "ManagePosts", new { type = "isVui4" })
<br />
<b>@Html.ActionLink("Tình", "ManagePosts", new { type = "isTinh" })</b> |
@Html.ActionLink("Chuyện trái tim", "ManagePosts", new { type = "isTinh1" })
|
@Html.ActionLink("Ngăn kéo", "ManagePosts", new { type = "isTinh2" })
|
@Html.ActionLink("Truyện ngắn", "ManagePosts", new { type = "isTinh3" })
|
@Html.ActionLink("Radio", "ManagePosts", new { type = "isTinh4" })
|
@Html.ActionLink("Video", "ManagePosts", new { type = "isTinh5" })
@*| <span class="addPost">
    <img src="@Url.Content("~/Content/Images/post.png")" alt="Add a new post" class="add-post-page" />
    @Html.ActionLink("Add a new post", "Add", "Post")
</span>*@
<br />
@using (Html.BeginForm())
{
    <fieldset>
        <div style="width: 400px; margin: 0 auto;">
            <div style="float: left;">
                @Html.TextBox("txtSearch", null, new { style = "width:300px" })
            </div>
            <div style="position: relative; float: right;">
                <input type="submit" value="Tìm kiếm" onclick="return ValidForm();" />
            </div>
        </div>
    </fieldset>
}
<table id="manage-table">
    <thead>
        <tr>
            <th class="header" scope="col">
                Post
            </th>
            <th class="header" scope="col">
                Author
            </th>
            <th class="header" scope="col">
                Categories
            </th>
            <th class="header" scope="col">
                Tags
            </th>
            <th class="header">
                Public Date
            </th>
            <th class="header" scope="col">
                Added Date
            </th>
        </tr>
    </thead>
    <tbody>
        @Html.Partial("ItemInfo", Model.Posts.Count)
        @foreach (var post in Model.Posts)
        {
            @Html.Partial("PostDetail", post)
        }
    </tbody>
    <tfoot>
        <tr>
            <th class="footer" scope="col">
                Post
            </th>
            <th class="footer" scope="col">
                Author
            </th>
            <th class="footer" scope="col">
                Categories
            </th>
            <th class="footer" scope="col">
                Tags
            </th>
            <th class="footer">
                Public Date
            </th>
            <th class="footer" scope="col">
                Added Date
            </th>
        </tr>
    </tfoot>
</table>
@Html.PageLinks(Model.PagingInfo, x => Url.Action("ManagePosts", new { page = x, type = Model.Type }))
@Html.HiddenFor(model => Model.OneTimeCode)
